using System.ComponentModel;
using System.Drawing;
using System.Web.UI;
using System.Web.UI.WebControls;
using AjaxControlToolkit;

[assembly: WebResource("jQueryNET.TextBox.TextBox.css", "text/css", PerformSubstitution = true)]
[assembly: WebResource("jQueryNET.TextBox.TextBox.js", "application/x-javascript", PerformSubstitution = true)]

namespace jQueryNET
{
	/// <summary>
	/// 
	/// </summary>
	[RequiredScript(typeof(JQueryScript), 0)]
	[ClientCssResource("jQueryNET.Common.Common.css")]
	[ClientCssResource("jQueryNET.TextBox.TextBox.css")]
	[ClientScriptResource("jQueryNET.Controls.TextBox", "jQueryNET.TextBox.TextBox.js")]
	[ToolboxBitmap(typeof(TextBox), "TextBox.TextBox.ico")]
	public class TextBox : ControlBase
	{
		#region Public constructors

		/// <summary>
		/// 
		/// </summary>
		public TextBox()
			: base(true, HtmlTextWriterTag.Input)
		{
		}

		#endregion

		#region Public properties

		[Description("Value of textbox")]
		[Category("Behavior")]
		[ExtenderControlProperty]
		[ClientPropertyName("text")]
		public string Text { get; set; }

		[Description("Max input value length")]
		[Category("Behavior")]
		[ExtenderControlProperty]
		[ClientPropertyName("maxLength")]
		public int MaxLength { get; set; }

		[ExtenderControlProperty]
		[ClientPropertyName("width")]
		public override Unit Width
		{
			get
			{
				return base.Width;
			}
			set
			{
				base.Width = value;
			}
		}

		[ExtenderControlProperty]
		[ClientPropertyName("height")]
		public override Unit Height
		{
			get
			{
				return base.Height;
			}
			set
			{
				base.Height = value;
			}
		}

		#endregion
	}
}